<!DOCTYPE html>
<html lang="zh">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
	<!-- 开发环境版本，包含了有帮助的命令行警告 -->
	<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
	<title></title>
	
</head>
<body>
	<div id="app">
		<parent></parent>
	</div>
	
	
	<script type="text/javascript">
		let child=Vue.extend({
			template:`
			<div>
				<h2>我是子组件</h2>
			</div>`
		})
		let parent=Vue.extend({
			template:`
			<div>
				<h1>我是父组件</h1>
				<child><child>
			</div>`,
			components:{
				child
			}
		})
		var app=new Vue({
			el:"#app",
			components:{
				parent
			}
		})
		
	</script>
</body>
</html>